<?php

namespace app\school\controller;

use app\common\controller\BasicAdmin;
use app\common\model\ParameterModel;


/**
 * Class Parameter
 * @package app\sunshine\controller
 */
class Parameter extends BasicAdmin
{
    /**
     * 参数管理
     */
    public function index()
    {
        $this->title = '参数管理';
        if ($this->request->isPost()) {
            $reminder = $this->request->post('reminder');
            (new ParameterModel())->save([
                'reminder'=>$reminder,
            ],['id'=>1]);
            $this->success('保存成功！');
        }
        $parameter = ParameterModel::where('id',1)->find();
        $this->assign('vo',$parameter);
        $this->fetch();
    }

}
